import 'package:seedfour/generated/json/base/json_field.dart';
import 'package:seedfour/generated/json/income_alloc_content_entity.g.dart';
import 'dart:convert';
export 'package:seedfour/generated/json/income_alloc_content_entity.g.dart';

@JsonSerializable()
class IncomeAllocContentEntity {
	late List<IncomeAllocContentPlans> plans = [];
	late int status = 0;
	late int createDate = 0;
	late IncomeAllocContentOrder order;
	late IncomeAllocContentRemain remain;

	IncomeAllocContentEntity();

	factory IncomeAllocContentEntity.fromJson(Map<String, dynamic> json) => $IncomeAllocContentEntityFromJson(json);

	Map<String, dynamic> toJson() => $IncomeAllocContentEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class IncomeAllocContentPlans {
	late List<IncomeAllocContentPlansAlloc> alloc = [];
	late int totalAmount = 0;
	late double totalPercent;
	late int planStatus = 0;
	late String approveUid = '';
	late String approveDate = '';

	IncomeAllocContentPlans();

	factory IncomeAllocContentPlans.fromJson(Map<String, dynamic> json) => $IncomeAllocContentPlansFromJson(json);

	Map<String, dynamic> toJson() => $IncomeAllocContentPlansToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class IncomeAllocContentPlansAlloc {
	late String uid = '';
	late double percent;
	late int amount = 0;
	late String mobile = '';
	late String name = '';
	late String id = '';

	IncomeAllocContentPlansAlloc();

	factory IncomeAllocContentPlansAlloc.fromJson(Map<String, dynamic> json) => $IncomeAllocContentPlansAllocFromJson(json);

	Map<String, dynamic> toJson() => $IncomeAllocContentPlansAllocToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class IncomeAllocContentOrder {
	late String title = '';
	late int orderAmount = 0;
	late int collectionDate = 0;
	late String agentUsername = '';

	IncomeAllocContentOrder();

	factory IncomeAllocContentOrder.fromJson(Map<String, dynamic> json) => $IncomeAllocContentOrderFromJson(json);

	Map<String, dynamic> toJson() => $IncomeAllocContentOrderToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class IncomeAllocContentRemain {
	late double percent;
	late int amount = 0;

	IncomeAllocContentRemain();

	factory IncomeAllocContentRemain.fromJson(Map<String, dynamic> json) => $IncomeAllocContentRemainFromJson(json);

	Map<String, dynamic> toJson() => $IncomeAllocContentRemainToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}